package com.ruoyi.equip.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("device_info")
public class DeviceInfo extends BaseEntity {

    @ApiModelProperty(value = "平台ID")
    @TableId("id")
    private String id;

    @ApiModelProperty(value = "设备ID")
    @TableField("sb_id")
    private String sbId;

    @ApiModelProperty(value = "设备名称")
    @TableField("device_name")
    private String deviceName;

    @ApiModelProperty(value = "所属用户组id")
    @TableField("dept_id")
    private String deptId;

    @ApiModelProperty(value = "所属用户id")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "设备类型")
    @TableField("node_type")
    private Integer nodeType;

    //@ApiModelProperty(value = "父级id")
    //@TableField("parent_id")
    //private String parentId;

    @ApiModelProperty(value = "经度")
    @TableField("longitude")
    private String longitude;

    @ApiModelProperty(value = "纬度")
    @TableField("latitude")
    private String latitude;

    @ApiModelProperty(value = "地址(用于手动输入地址进行经纬度)")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "所属产品ID")
    @TableField("product_key")
    private String productKey;

    @ApiModelProperty(value = "设备在线时间")
    @TableField("online_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date  onlineTime;

    @ApiModelProperty(value = "设备离线时间")
    @TableField("offline_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date  offlineTime;

    @ApiModelProperty(value = "创建者")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date  createTime;

    @ApiModelProperty(value = "更新者")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date  updateTime;



    @ApiModelProperty(value = "工作模式 00 被动 01 定时")
    @TableField("mode")
    private Integer mode;

    @ApiModelProperty(value = "间隔时间")
    @TableField("cycle")
    private Integer cycle;








}
